package com.gk.springcloudauth2email.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author poison
 * @Date 2020/10/19 9:36
 */
@RestController
public class EmailController {

    @RequestMapping(value = "/send")
    //拥有p1权限方可访问此url
    @PreAuthorize("hasAnyAuthority('p1')")
    public String testE1(){
        return "调用邮件发送功能";
    }
}
